Add module-specific assertions (Doctrine, Environment, Security, Session) - #218
Add module-specific assertions (Doctrine, Environment, Security, Session)#218TavoNiievez wants to merge 1 commit into
Conversation
e1200e3 to
1e515ac
Compare
|
Hi @ThomasLandauer @xEdelweiss , Can you take a look at the PR and give me your opinion on the new methods, please? |
|
Well, these are many... :-)
|
|
Hi @TavoNiievez |
42f67c0 to
afb9a63
Compare
|
Thanks for the thorough review, @ThomasLandauer! Answers to your three higher-level questions:
I've pushed a commit addressing the inline comments (naming + docblock clarifications) and replied in each thread. |
1614142 to
2826ad5
Compare
|
Looks like GitHub's "Mark conversation as resolved" button is gone, so I just gave a thumbs-up to all above line comments ;-) For the other points:
|
2826ad5 to
1bcb717
Compare
…ion) Add high-level, actor-style assertions that rely on Symfony kernel and container integration and have no pure-Symfony equivalent. They belong to the see* / dontSee* family of the naming convention documented in CONTRIBUTING.md, which is extended here. - DoctrineAssertionsTrait: seeDoctrineDatabaseIsUp, seeDoctrineSchemaIsValid, seeDoctrineProxyDirIsWritable - EnvironmentAssertionsTrait (new): seeKernelEnvironmentIs, seeDebugModeEnabled, dontSeeDebugModeEnabled, seeSymfonyVersion, seeAppEnvAndDebugMatchKernel, seeAppCacheIsWritable, seeAppLogIsWritable, seeProjectStructureIsSane, seeEnvFileIsSynchronized, seeBundleIsEnabled, seeAssetManifestExists, seeKernelCharsetIs - SecurityAssertionsTrait: seeFirewallIsConfigured, seeRoleInHierarchy, seeSecretCanBeResolved - SessionAssertionsTrait: seeSessionSavePathIsWritable Register EnvironmentAssertionsTrait on the Symfony module facade and document the see* / assert* naming convention in CONTRIBUTING.md. Unit tests cover the methods exercisable against the test app under tests/_app. The remaining checks need a full Symfony project layout that the mini test app does not provide (seeProjectStructureIsSane, seeAssetManifestExists, seeEnvFileIsSynchronized, seeSecretCanBeResolved); per the two-layer test setup those belong in the companion Codeception/symfony-module-tests functional suite. Also stop the functional CI job from installing a second copy of the module into the app: it removed codeception/module-symfony with --no-update and then ran `composer install`, which reinstalls from the app's lockfile, so the module source under test and a stale released copy were both autoloaded.
d9ab687 to
a25f101
Compare
|
Closed and recreated from the same branch (same commit) to clear stale force-push entries in this timeline. The replacement is pull request 246; the review discussion on this page stays here for reference. |
|
Link: #246 |
What
Adds high-level, actor-style assertions that rely on Symfony kernel/container integration and have no pure-Symfony equivalent. These belong to the
see*/dontSee*family of the naming convention documented inCONTRIBUTING.md(also extended here).Methods
seeDoctrineDatabaseIsUp,seeDoctrineSchemaIsValid,seeDoctrineProxyDirIsWritableseeKernelEnvironmentIs,seeDebugModeEnabled,dontSeeDebugModeEnabled,seeSymfonyVersion,seeAppEnvAndDebugMatchKernel,seeAppCacheIsWritable,seeAppLogIsWritable,seeProjectStructureIsSane,seeEnvFileIsSynchronized,seeBundleIsEnabled,seeAssetManifestExists,seeKernelCharsetIsseeFirewallIsConfigured,seeRoleInHierarchy,seeSecretCanBeResolvedseeSessionSavePathIsWritableRegisters
EnvironmentAssertionsTraiton theSymfonymodule facade and documents thesee*/assert*naming convention inCONTRIBUTING.md.Tests
Unit tests added for the methods exercisable against the test app (
tests/_app): Doctrine checks, the firewall check, Symfony-version/env-debug/project-dir environment checks.The remaining checks require a full real Symfony project layout that the mini unit-test app does not provide (
seeProjectStructureIsSane,seeAssetManifestExists,seeEnvFileIsSynchronized,seeSecretCanBeResolved); per the two-test-layer setup these are best covered in the companionCodeception/symfony-module-testsfunctional suite.Notes
Companion to #240, which contains the Symfony-mirroring
assert*/get*assertions. The two PRs touch disjoint files and can be reviewed/merged independently.